package com.wujige;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;

/**
 * 连接测试
 * @author: lipan
 * @date: 2021/4/26 20:33
 */

public class ConneTest {


    private  static  final  String host="127.0.0.1";

    private static  final  int port=9200;

    private  static  final String protocol="http";

    public static void main(String[] args) throws Exception {

        RestHighLevelClient client=new RestHighLevelClient(RestClient.builder(new HttpHost(host,port,protocol)));

        client.close();
    }


}
